Assigns the values of a CSR matrix to a dense matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(out), | dimension(:,:) | :: | dense |
The dense matrix. |
|
class(csr_matrix), | intent(in) | :: | sparse |
The CSR matrix. |
Assigns the values of a dense matrix to a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(csr_matrix), | intent(out) | :: | sparse |
The CSR matrix. |
||
real(kind=real64), | intent(in), | dimension(:,:) | :: | dense |
The dense matrix. |
Assigns an MSR matrix to a dense matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(out), | dimension(:,:) | :: | dense |
The dense matrix. |
|
class(msr_matrix), | intent(in) | :: | msr |
The MSR matrix. |
Assigns a dense matrix to an MSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(msr_matrix), | intent(out) | :: | msr |
The MSR matrix. |
||
real(kind=real64), | intent(in), | dimension(:,:) | :: | dense |
The dense matrix. |
Assigns a CSR matrix to an MSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(msr_matrix), | intent(out) | :: | msr |
The MSR matrix. |
||
class(csr_matrix), | intent(in) | :: | csr |
The CSR matrix. |
Assigns an MSR matrix to a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(csr_matrix), | intent(out) | :: | csr |
The CSR matrix. |
||
class(msr_matrix), | intent(in) | :: | msr |
The MSR matrix. |
Multiplies two CSR matrices together.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The first CSR matrix. |
||
class(csr_matrix), | intent(in) | :: | b |
The second CSR matrix. |
The resulting CSR matrix.
Multiplies a CSR matrix by a vector.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The CSR matrix. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | b |
The vector. |
The resulting vector.
Returns the number of non-zero values in the matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | x |
The CSR matrix object. |
The number of non-zero values in the matrix.
Returns the number of non-zero elements in an MSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(msr_matrix), | intent(in) | :: | x |
The MSR matrix. |
The number of non-zero elements.
Multiplies a CSR matrix by a scalar.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The CSR matrix. |
||
real(kind=real64), | intent(in) | :: | b |
The scalar. |
The resulting CSR matrix.
Multiplies a scalar by a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | a |
The scalar. |
||
class(csr_matrix), | intent(in) | :: | b |
The CSR matrix. |
The resulting CSR matrix.
Adds two CSR matrices.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The first CSR matrix. |
||
class(csr_matrix), | intent(in) | :: | b |
The second CSR matrix. |
The resulting CSR matrix.
Subtracts two CSR matrices.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The first CSR matrix. |
||
class(csr_matrix), | intent(in) | :: | b |
The second CSR matrix. |
The resulting CSR matrix.
Divides a CSR matrix by a scalar.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The CSR matrix. |
||
real(kind=real64), | intent(in) | :: | b |
The scalar. |
Solves a linear system using the PGMRES method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The matrix. |
||
class(msr_matrix), | intent(in) | :: | lu |
The LU factored matrix. |
||
integer(kind=int32), | intent(in), | dimension(:) | :: | ju |
The row tracking array. |
|
real(kind=real64), | intent(inout), | dimension(:) | :: | b |
The right-hand side. |
|
real(kind=real64), | intent(out), | dimension(:) | :: | x |
The solution. |
|
integer(kind=int32), | intent(in), | optional | :: | im |
The Krylov subspace size. |
|
real(kind=real64), | intent(in), | optional | :: | tol |
The convergence tolerance. |
|
integer(kind=int32), | intent(in), | optional | :: | maxits |
The maximum number of iterations. |
|
integer(kind=int32), | intent(in), | optional | :: | iout |
The output level. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
Returns the size of the matrix along the specified dimension.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | x |
The CSR matrix object. |
||
integer(kind=int32), | intent(in) | :: | dim |
The dimension to return the size of. |
The size of the matrix along the specified dimension.
Returns the size of the specified dimension of an MSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(msr_matrix), | intent(in) | :: | x |
The MSR matrix. |
||
integer(kind=int32), | intent(in) | :: | dim |
The dimension to return the size of. |
The size of the specified dimension.
Solves a linear system using a direct method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The matrix. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | b |
The right-hand side. |
|
real(kind=real64), | intent(out), | dimension(:) | :: | x |
The solution. |
|
real(kind=real64), | intent(in), | optional | :: | droptol |
The drop tolerance for the ILUT factorization. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
Transposes a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The CSR matrix. |
The transposed CSR matrix.
A sparse matrix stored in compressed sparse row (CSR) format.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | public, | allocatable, dimension(:) | :: | column_indices |
An NNZ-element array, where NNZ is the number of non-zero values, containing the column indices of each value. |
||
integer(kind=int32), | public, | allocatable, dimension(:) | :: | row_indices |
An M+1 element array containing the indices in V an JA at which the requested row starts. |
||
real(kind=real64), | public, | allocatable, dimension(:) | :: | values |
An NNZ-element array, where NNZ is the number of non-zero values, containing the non-zero values of the matrix. |
procedure, public :: extract_diagonal => csr_extract_diagonal | |
procedure, public :: get => csr_get_element |
A sparse matrix stored in modified sparse row format.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | public, | allocatable, dimension(:) | :: | indices |
An NNZ-element array containing the index information. |
||
integer(kind=int32), | public | :: | m | = | 0 |
The number of rows in the matrix. |
|
integer(kind=int32), | public | :: | n | = | 0 |
The number of columns in the matrix. |
|
integer(kind=int32), | public | :: | nnz | = | 0 |
The number of nonzero values in the matrix. |
|
real(kind=real64), | public, | allocatable, dimension(:) | :: | values |
An NNZ-element array containing the non-zero values from the matrix. The first MIN(M,N) elements contain the diagonal. |
Converts a banded matrix to a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | m |
The number of rows in the banded matrix. |
||
integer(kind=int32), | intent(in) | :: | ml |
The number of lower diagonals in the banded matrix. |
||
integer(kind=int32), | intent(in) | :: | mu |
The number of upper diagonals in the banded matrix. |
||
real(kind=real64), | intent(in), | dimension(:,:) | :: | a |
The banded matrix to convert. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The CSR matrix.
Creates a CSR matrix from the input data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | m |
The number of rows in the matrix. |
||
integer(kind=int32), | intent(in) | :: | n |
The number of columns in the matrix. |
||
integer(kind=int32), | intent(in), | dimension(:) | :: | rows |
The row indices. |
|
integer(kind=int32), | intent(in), | dimension(:) | :: | cols |
The column indices. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | vals |
The values. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The CSR matrix.
Creates an empty CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | m |
The number of rows in the matrix. |
||
integer(kind=int32), | intent(in) | :: | n |
The number of columns in the matrix. |
||
integer(kind=int32), | intent(in) | :: | nnz |
The number of non-zero values in the matrix. |
||
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The empty CSR matrix.
Creates an empty MSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | m |
The number of rows in the matrix. |
||
integer(kind=int32), | intent(in) | :: | n |
The number of columns in the matrix. |
||
integer(kind=int32), | intent(in) | :: | nnz |
The number of non-zero elements in the matrix. |
||
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The MSR matrix.
Converts a CSR matrix to an MSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The CSR matrix to convert. |
||
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The MSR matrix.
Converts a dense matrix to a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in), | dimension(:,:) | :: | a |
The dense matrix to convert. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The CSR matrix.
Converts a dense matrix to an MSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in), | dimension(:,:) | :: | a |
The dense matrix to convert. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The MSR matrix.
Converts a diagonal matrix to a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in), | dimension(:) | :: | a |
The diagonal matrix to convert. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The CSR matrix.
Converts an MSR matrix to a CSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(msr_matrix), | intent(in) | :: | a |
The MSR matrix to convert. |
||
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
The CSR matrix.
Converts a CSR matrix to a dense matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(csr_matrix), | intent(in) | :: | a |
The CSR matrix to convert. |
||
real(kind=real64), | intent(out), | dimension(:,:) | :: | x |
The dense matrix. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |
Converts an MSR matrix to a dense matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(msr_matrix), | intent(in) | :: | a |
The MSR matrix to convert. |
||
real(kind=real64), | intent(out), | dimension(:,:) | :: | x |
The dense matrix. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
The error object to be updated. |